﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoVuaClient
{
    class QuanMa : QuanCo
    {
        public QuanMa(bool pheMinh)
        {
            PheMinh = pheMinh;
            TenQuanCo = "Ma";
            if (PheMinh)
            {
                PathImage = @"/CoVuaClient;component/Pic/KnightYellow.png";
            }
            else
            {
                PathImage = @"/CoVuaClient;component/Pic/KnightBlack.png";
            }
        }
        public override List<OCo> NhungOCoTheDi(BanCo banCo, OCo oHienTai, bool kiemTraChieuTuong)
        {
            List<OCo> danhSach = new List<OCo>();
            foreach (var oCo in oHienTai.DanhSachOQuanMa())
            {
                if (!KiemTraCoQuanTa(banCo, oCo))
                {
                    danhSach.Add(oCo);
                }
            }
            return danhSach;
        }
        public override void ChangeState()
        {
            DangChon = !DangChon;
            if (DangChon)
            {
                PathImage = @"/CoVuaClient;component/Pic/KnightYellowChecked.png";
            }
            else
            {
                PathImage = @"/CoVuaClient;component/Pic/KnightYellow.png";
            }
        }
    }
}
